﻿<!DOCTYPE html>
<?php
	include_once("inc/constants.inc.php");
	include_once("inc/connection.php");
	session_start();
?>
<html>
	<head>
		<meta charset="utf-8"> 
		<title>Welcome to Smartek online test</title>
		<link rel="SHORTCUT ICON" href="img/disp/favicon.png" />	
		<link rel="stylesheet" href="css/bootstrap.css"  type="text/css"/>

	</head>
	<body>
		<!-- <script src="http://code.jquery.com/jquery-1.10.1.min.js"></script> -->
		<!-- <script src="js/jquery-1.10.1.js"></script> -->
		<script src="js/jquery-1.10.1.js"></script>
		<script src="js/bootstrap.js"></script>
		<script src="js/registration.js"></script>
		<script>
			 $(function(){
				$('selector').css( 'cursor', 'pointer' );
				$("#employeeDetails").hide();
				$("#referrer").change(function() {
					if($("#referrer").val()=="Employee Referral"){
						$("#employeeDetails").show();
					}
					else{
						$("#employeeDetails").hide();
						$("#employeeId").val("");
						$("#employeeName").val("");
					}
				});
		   });
		</script>
		
		<div class="container">
			<!--<h1><a href="#">My Arunachel Pradesh</a></h1>-->
			<img src="img/disp/logo.png" alt="">
		</div>

		<div class="container">
			<div class="row pull-right">
				<div class="span4 pull-right" >
					<div class="pull-right">
						<?php 
						if(!isset($_SESSION['name']) || empty($_SESSION['name'])) echo  "<a href='login.php'>Login</a>";
						if(isset($_SESSION['name']) && !empty($_SESSION['name']) && isset($_SESSION['user_role']) && $_SESSION['user_role']==1) echo  "Welcome ".$_SESSION['name']."! | <a href='dashboard.php'>Dashboard</a> | <a href='logout.php'>Log out</a>"; 
						if(isset($_SESSION['name']) && !empty($_SESSION['name']) && isset($_SESSION['user_role']) && $_SESSION['user_role']==2) echo  "Welcome ".$_SESSION['name']."! | <a href='test.php'>Continue test</a> | <a href='logout.php'>Log out</a>"; 
						?>
					</div>
				</div>
			</div>
		</div>
		<div class="container">
			<hr class="featurette-divider">
			<div class="row pull-right">
				<div class="span4 pull-right" >
					<div class="pull-right">
						<font color='red' style="font-size:11px">* Mandatory Fields</font>
					</div>
				</div>
			</div>
		</div>
		
		<div class="container">
			<div class="row">
				<div class="span12">
					<form method="post" action="process/registration.php" id="registrationForm">
						<h4>Please enter the registration details</h2>
							</br></br>
						
								<div class="container">
									<div class="row">
										<div class="span2">Name <font color='red'> *</font></div>
										<div class="span9"><input type="text" tabindex="1" maxlength="60" id="name" name="name" value="Full name" onFocus="if(this.value=='Full name'){ this.value='';}" onBlur="if(this.value==''){ this.value='Full name';}"><span class="error" id="nameError"></span></div>										
									</div>
								</div>
								<div class="container">
									<div class="row">
										<div class="span2">Mobile No. <font color='red'> *</font></div>
										<div class="span9"><input type="text" tabindex="2" maxlength="10" id="mobileNo" name="mobileNo" value="10-digit mobile number" onFocus="if(this.value=='10-digit mobile number'){ this.value='';}" onBlur="if(this.value==''){ this.value='10-digit mobile number';}"><span class="error" id="mobileNoError"></span></div>										
									</div>
								</div>
								<div class="container">
									<div class="row">
										<div class="span2">Email <font color='red'> *</font></div>
										<div class="span9"><input type="text" tabindex="3" maxlength="60" id="email" name="email" value="Personal email address" onFocus="if(this.value=='Personal email address'){ this.value='';}" onBlur="if(this.value==''){ this.value='Personal email address';}"><span class="error" id="emailError"></span></div>										
									</div>
								</div>
								
							<!--
								<div class="container">
									<div class="row">
										<div class="span2">Roll number</div>
										<div class="span9"><input type="text" tabindex="3" maxlength="20" placeholder="DE/11/EC/02" id="rollNumber" name="rollNumber" value=""><span class="error" id="rollNumberError"></span></div>										
									</div>
								</div>
								<div class="container">
									<div class="row">
										<div class="span2">College/University</div>
										<div class="span9"><input type="text" tabindex="4" maxlength="100" placeholder="NERIST" id="college" name="college" value=""><span class="error" id="collegeError"></span></div>										
									</div>
								</div>
							-->
								<div class="container">
									<div class="row">
										<div class="span2">Experience <font color='red'> *</font></div>
										<div class="span9"><input type="text" tabindex="4" maxlength="100" id="experience" name="experience" value="e.g.: 1 or 2.5" onFocus="if(this.value=='e.g.: 1 or 2.5'){ this.value='';}" onBlur="if(this.value==''){ this.value='e.g.: 1 or 2.5';}"><span class="error" id="experienceError"></span></div>										
									</div>
								</div>
								<div class="container">
									<div class="row">
										<div class="span2">Company <font color='red'> *</font></div>
										<div class="span9"><input type="text" tabindex="5" maxlength="100" id="company" name="company" value="Current/Previous company name" onFocus="if(this.value=='Current/Previous company name'){ this.value='';}" onBlur="if(this.value==''){ this.value='Current/Previous company name';}"><span class="error" id="companyError"></span></div>										
									</div>
								</div>	
								<div class="container">
									<div class="row">
										<div class="span2">Referred by <font color='red'> *</font></div>
										<div class="span9">
										<select name="referrer" id="referrer" tabindex="6">
											<option value="--">Select referrer</option>
											<option value="Walk In">Walk In</option>
											<option value="Naukri Advertisement">Naukri Advertisement</option>
											<option value="Monster Advertisement">Monster Advertisement</option>
											<option value="Consultancy">Consultancy</option>
											<option value="Candidate Referral">Candidate Referral</option>
											<option value="Employee Referral">Employee Referral</option>
										</select>
										<span class="error" id="referrerError"></span></div>								
									</div>
								</div>
								<div id="employeeDetails">
									<div class="container">
										<div class="row">										
											<div class="span2">Employee Id</div>
											<div class="span9">											
												<input type="text" maxlength="100" placeholder="428" id="employeeId" name="employeeId" value="">
												<span class="error" id="employeeIdError"></span>
											</div>
										</div>
									</div>
									<div class="container">
										<div class="row">										
											<div class="span2">Employee Name <font color='red'> *</font></div>
											<div class="span9">											
												<input type="text" maxlength="100" placeholder="Telly Morge" id="employeeName" name="employeeName" value="">
												<span class="error" id="employeeNameError"></span>
											</div>
										</div>
									</div>
								</div>
								<div class="container">
									<div class="row">
										<div class="span2">Location <font color='red'> *</font></div>
										<div class="span9">
										<select name="location" id="location" tabindex="7">
												<option value="--">Select location</option>
												<option value="Chennai">Chennai</option>
												<option value="Pune">Pune</option>
										</select><span class="error" id="locationError"></span></div>								
									</div>
								</div>
								<div class="container">
									<div class="row">
										<div class="span2">Technology/Domain <font color='red'> *</font></div>
										<div class="span9">
										<select name="domain" id="domain" tabindex="8">
											<option value="--">Select domain</option>
											<?php
												$result = mysql_query("SELECT * FROM question_type WHERE isDeleted='no'");	
												while($row = mysql_fetch_array($result))
												{
											?>
												<option value="<?php echo $row['QTypeID'] ;?>"><?php echo $row['QType'] ;?></option>
											<?php	
												}
											?>
										</select><span class="error" id="domainError" ></span></div>								
									</div>
								</div>								
								<div class="container">
									<div class="row">
										<div class="span2">Password <font color='red'> *</font></div>
										<div class="span9"><input type="password" tabindex="9" maxlength="30" id="password" name="password" value=""><span class="error" id="passwordError"></span></div>										
									</div>
								</div>
								<div class="container">
									<div class="row">
										<div class="span2">Confirm password <font color='red'> *</font></div>
										<div class="span9"><input type="password" tabIndex="10" maxlength="30"  id="confirmPassword" name="confirmPassword" value=""><span class="error" id="confirmPasswordError"></span></div>										
									</div>
								</div>
								<div class="container">
									<div class="row">
										<div class="span2">Gender <font color='red'> *</font></div>
										<div class="span9">
											<input type="radio" class="option-style gender" tabindex="11" name="gender" <?php if (isset($gender) && $gender=="female") echo "checked";?>  value="female"><span>Female</span>
											&nbsp &nbsp &nbsp &nbsp  <input class="option-style gender" tabindex="12"  type="radio" name="gender" <?php if (isset($gender) && $gender=="male") echo "checked";?>  value="male" /><span>Male</span>
											&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="error" id="genderError"></span>
										</div>										
									</div>
								</div>
								</br>
								</br>
								</br>
					   <input type="button" class="btn" name="button" value="Register" tabIndex="13" onclick="validate()" >
					</form>
				</div>
			</div>
		</div>
			
		<div class="container marketing">
      <!-- FOOTER -->
		<hr class="featurette-divider">
		<footer>
			<p>&copy; 2014 SCS &middot; </p>
		</footer>

    </div><!-- /.container -->
	</body>
</html>